-- GENERATED SPELL FOR [Tempest-Smith] --


function spell0_20042(pUnit, Event) --@Fragmentation Bomb,n/a--
pUnit:FullCastSpellOnTarget(37120,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20042', 5000, 1)
end

function spell1_20042(pUnit, Event) --@Golem Repair,n/a--
pUnit:FullCastSpellOnTarget(34946,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20042', 584, 1)
end

function spell2_20042(pUnit, Event) --@Power Up,n/a--
pUnit:FullCastSpellOnTarget(37112,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20042', 10295, 1)
end

function spell3_20042(pUnit, Event) --@Shell Shock,n/a--
pUnit:FullCastSpellOnTarget(37118,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20042', 3276, 1)
end

function Sorts_20042(pUnit, Event)
local choix_sorts_20042 = math.random(0, 3)
if choix_sorts_20042 == 0 then
pUnit:RegisterEvent('spell0_20042', 1, 1)
end
if choix_sorts_20042 == 1 then
pUnit:RegisterEvent('spell1_20042', 1, 1)
end
if choix_sorts_20042 == 2 then
pUnit:RegisterEvent('spell2_20042', 1, 1)
end
if choix_sorts_20042 == 3 then
pUnit:RegisterEvent('spell3_20042', 1, 1)
end
end

function mob20042_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20042', math.random(1500, 3000), 1)
end

function mob20042_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20042_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20042_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20042, 1, 'mob20042_Action')
RegisterUnitEvent(20042, 2, 'mob20042_Leave')
RegisterUnitEvent(20042, 3, 'mob20042_Kill')
RegisterUnitEvent(20042, 4, 'mob20042_Die')
